package com.gua.encrypt.config;

import java.io.Serializable;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import cn.hutool.crypto.Mode;
import cn.hutool.crypto.Padding;
import lombok.EqualsAndHashCode;

/**
 * @author huangjj
 * 
 * @description: AES需要的配置参数
 */
@Configuration
@ConfigurationProperties(prefix = "crypto.aes")
@EqualsAndHashCode
public class AESCryptProperties implements Serializable {

	private static final long serialVersionUID = -8651659503283804251L;

	private Mode mode;
    
    private Padding padding;
    
    /**
     * base64 秘钥
     */
    private String key;
    
    /**
     * base64 向量
     */
    private String iv;

	public Mode getMode() {
		return mode;
	}

	public void setMode(Mode mode) {
		this.mode = mode;
	}

	public Padding getPadding() {
		return padding;
	}

	public void setPadding(Padding padding) {
		this.padding = padding;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getIv() {
		return iv;
	}

	public void setIv(String iv) {
		this.iv = iv;
	}
    
}
